<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>用户展示页面</title>
    <link href="../../css/bootstrap.min.css" rel="stylesheet">
    <script src="../../js/jquery-3.2.1.min.js"></script>
    <script src="../../js/bootstrap.min.js"></script>
</head>
<body>
<div align="center">
    <button class="btn btn-success btn-lg"
            onclick='location.href="${ctx}/store/user?operation=toAdd"'>新增用户
    </button>
</div>
<div align="left">
    <table class="table table-striped">
        <thead>
        <tr>
            <th>
                <input type="checkbox">
            </th>
            <th>用户Id</th>
            <th>用户名称</th>
            <th>用户邮箱地址</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${page}" var="item" varStatus="status">
            <tr>
                <td><input name="ids" value="${item.id}" type="checkbox"></td>
                <td>${item.id }</td>
                <td>${item.username}</td>
                <td>${item.email }</td>
                <th class="text-center">
                    <button type="button" class="btn bg-olive btn-xs" onclick='location.href="${ctx}/store/user?operation=toEdit&id=${item.id}"'>编辑</button>
                    <button type="button" class="btn bg-olive btn-xs" onclick='location.href="${ctx}/store/user?operation=delete&id=${item.id}"'>删除</button>
                </th>
            </tr>
        </c:forEach>
        </tbody>
    </table>
</div>
</body>
</html>
